#include <stdio.h>
int Isnum(int n)
{
    for (int i = 2; i * i <= n; i++)
    {
        if (n % i == 0)
            return 0;
    }
    return 1;
}
int main()
{
    int n = 0, count = 0;
    scanf("%d", &n);
    for (int i = 2; i <= n; i++)
    {
        if (Isnum(i))
            count++;
    }
    printf("%d", count);
    return 0;
}